package _07聊天系统;

import java.io.*;
import java.net.Socket;
import java.util.Scanner;

public class ChatClient {
    public static void main(String[] args) throws IOException {
        Socket socket = new Socket("127.0.0.1",9999);

        Scanner sc = new Scanner(System.in);
        System.out.println("请输入聊天信息");
        String line = sc.nextLine();

        PrintStream p = new PrintStream(socket.getOutputStream());
        p.println(line);

        InputStream is = socket.getInputStream();
        InputStreamReader isr =new InputStreamReader(is);
        BufferedReader br = new BufferedReader(isr);
        String readLine = br.readLine();



    }
}
